﻿namespace instamuz.Domain.Entities
{
    using System;
    using IndyCode.Infrastructure.Domain;
    using JetBrains.Annotations;

    public class Post : IEntity
    {
        [UsedImplicitly]
        protected Post()
        {
        }

        public Post(string description)
        {
            Description = description;
            CreatedAt = DateTime.Now;
        }

        public virtual int Id { get; set; }

        [CanBeNull]
        public virtual string Description { get; protected set; }

        public virtual DateTime CreatedAt { get; protected set; }

        [NotNull]
        public virtual Account Account { get; protected set; }

        public virtual void SetAccount(Account account)
        {
            Account = account;
        }
    }
}